Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set best_fit_args to confidence_interval_args if None #76

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

kdund
Copy link
Collaborator

@kdund kdund commented Aug 10, 2023

Using best_fit_args is mostly relevant for 1D slices of higher-dimensional confidence volumes.
In most cases, we want it to be set to confidence_interval_args.
This PR sets it to confidence_interval_args, and makes the docstring more explicit. Also moves it to the last place in the argument list to emphasize that it is a rarer argument.

What do you think about setting confidence_interval_args via kwargs instead?

@kdund kdund added the inference Statistics code label Aug 10, 2023
@kdund kdund requested a review from dachengx August 10, 2023 18:08
@kdund kdund mentioned this pull request Aug 10, 2023
alea/model.py Outdated
also the best-fit parameters of profile-likelihood,
parameter_interval_bounds, and confidence interval
confidence_interval_args (dict, optional (default=None)): Parameters that will be fixed
in the profile likelihood computation. If None, all fittable parameters will be profiled except the poi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
E501 line too long (116 > 100 characters)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, we require 4 spaces indent, if using VSCode, the 'indent-rainbow' extension will help you to see the indents.

I would change this into:

            confidence_interval_args (dict, optional (default=None)):
                Parameters that will be fixed in the profile likelihood computation.
                If None, all fittable parameters will be profiled except the poi.

Similar things apply to other docstrings complained about by reviewdog.

parameter_interval_bounds, and confidence interval
confidence_interval_args (dict, optional (default=None)): Parameters that will be fixed
in the profile likelihood computation. If None, all fittable parameters will be profiled except the poi
best_fit_args (dict, optional (default=None)): If you require the "global" best-fit used to normalise the

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
E501 line too long (117 > 100 characters)

alea/model.py Outdated
confidence_interval_args (dict, optional (default=None)): Parameters that will be fixed
in the profile likelihood computation. If None, all fittable parameters will be profiled except the poi
best_fit_args (dict, optional (default=None)): If you require the "global" best-fit used to normalise the
profile likelihood ratio to fix fewer parameters than the profile likelihood-- mainly used for 1-D slices

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
E501 line too long (118 > 100 characters)

alea/model.py Outdated
in the profile likelihood computation. If None, all fittable parameters will be profiled except the poi
best_fit_args (dict, optional (default=None)): If you require the "global" best-fit used to normalise the
profile likelihood ratio to fix fewer parameters than the profile likelihood-- mainly used for 1-D slices
of higher-dimensional confidence volumes, where the global best-fit may not be along the profile.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
E501 line too long (110 > 100 characters)

jingqiangye

This comment was marked as off-topic.

Copy link
Collaborator

@dachengx dachengx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kdund . Looks good!

alea/model.py Outdated
also the best-fit parameters of profile-likelihood,
parameter_interval_bounds, and confidence interval
confidence_interval_args (dict, optional (default=None)): Parameters that will be fixed
in the profile likelihood computation. If None, all fittable parameters will be profiled except the poi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, we require 4 spaces indent, if using VSCode, the 'indent-rainbow' extension will help you to see the indents.

I would change this into:

            confidence_interval_args (dict, optional (default=None)):
                Parameters that will be fixed in the profile likelihood computation.
                If None, all fittable parameters will be profiled except the poi.

Similar things apply to other docstrings complained about by reviewdog.

@github-actions
Copy link

github-actions bot commented Aug 10, 2023

Pull Request Test Coverage Report for Build 5825140268

  • 1 of 2 (50.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 72.056%

Changes Missing Coverage Covered Lines Changed/Added Lines %
alea/model.py 1 2 50.0%
Totals Coverage Status
Change from base Build 5806758278: 0.0%
Covered Lines: 771
Relevant Lines: 1070

💛 - Coveralls

@dachengx dachengx merged commit fedfe75 into main Aug 10, 2023
@dachengx dachengx deleted the confidence_interval_arguments branch August 10, 2023 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inference Statistics code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants